﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Principal.Master" AutoEventWireup="true" CodeBehind="listSetor.aspx.cs" Inherits="SRD.View.Views.listSetor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style3
        {
            width: 31%;
        }
        .style4
        {
            width: 100px;
        }
        .style5
        {
            height: 71px;
        }
        .style6
        {
            height: 23px;
        }
        </style>

        <link rel="stylesheet" href="/Util/messagebox/ExtJS/resources/css/ext-all.css" type="text/css"
        media="screen" />

        <script src="/Util/messagebox/ExtJS/ext-base.js" type="text/javascript"></script>

        <script src="/Util/messagebox/ExtJS/ext-all.js" type="text/javascript"></script>

        <link rel="stylesheet" href="/Util/messagebox/messagebox.css" type="text/css" media="screen" />

        <script src="/Util/messagebox/messagebox.js" type="text/javascript"></script>

        <link rel="stylesheet" href="/Util/messagebox/messagebox.css" type="text/css" media="screen" />

        <script src="/Util/messagebox/messagebox.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <table bgcolor=#FFFFFF>
        <tr>
            <td align="center" valign="top" style="width: 960px;">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
            <br />
                    <table class="style3" style="font-family: Verdana" bgcolor=#F0F8FF>
                        <tr>
                            <td align="center" bgcolor="#284775" class="style6" colspan="4">
                                <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Verdana" 
                                    Font-Size="X-Large" ForeColor="White" Text="Cadastro de Setores"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="style5" colspan="4">
                                <asp:TextBox ID="txtPesquisa" runat="server" Height="22px" Width="254px"></asp:TextBox>
                                &nbsp;<asp:ImageButton ID="btnPesquisa" runat="server" Height="19px" 
                                    ImageUrl="~/Imagens/Consultar.png" onclick="PesquisaSetores" 
                                    Width="23px" />
                                &nbsp;Pesquisar</td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <asp:GridView ID="GridSetor" runat="server" AllowPaging="True" 
                                    AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
                                    DataKeyNames="SETOR_ID" Font-Names="Verdana" Font-Size="Small" 
                                    ForeColor="#333333" GridLines="None" HorizontalAlign="Center" 
                                    onPageIndexChanging="GridSetor_PageIndexChanging" 
                                    OnRowDeleting="GridSetor_RowDeleting" PageSize="5" RowHeaderColumn="NM_SETOR" 
                                    Width="510px">
                                    <AlternatingRowStyle BackColor="White" />
                                    <Columns>
                                        <asp:BoundField DataField="NM_SETOR" HeaderText="Setor">
                                        <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="500px" />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText="Opções">
                                            <ItemTemplate>
                                                <asp:ImageButton ID="BtEditar" runat="server" CausesValidation="False" 
                                                    EnableViewState="false" ImageUrl="~/Imagens/icone_edicao.jpg" 
                                                    PostBackUrl='<%# Eval("SETOR_ID", "editSetor.aspx?&id_setor={0}") %>' 
                                                    ToolTip="Alterar" />
                                                <asp:ImageButton ID="BtExcluir" runat="server" CommandName="delete" 
                                                    Height="26px" ImageUrl="~/Imagens/icone_borracha.jpg" 
                                                    OnClientClick="return confirm('Confirma exclusão?')" ToolTip="Excluir" 
                                                    Width="32px" />
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" />
                                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" Width="100px" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <EditRowStyle BackColor="#2461BF" />
                                    <FooterStyle BackColor="#284775" Font-Bold="True" ForeColor="White" />
                                    <HeaderStyle BackColor="#284775" Font-Bold="True" Font-Size="Large" 
                                        ForeColor="White" />
                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#EFF3FB" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td class="style4">
                            </td>
                            <td align="center">
                                <asp:ImageButton ID="BtnNovo" runat="server" Height="31px" 
                                    ImageUrl="~/Imagens/Adicionar.png" onclick="BtnNovo_Click" Width="31px" />
                        <br />
                                Novo</td>
                            <td align="center">
                                <asp:ImageButton ID="BtnVoltar" runat="server" 
                                    ImageUrl="~/Imagens/SAIRTELA.png" onclick="BtnVoltar_Click" />
                        <br />
                                Voltar</td>
                            <td class="style4">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" bgcolor="#284775">
                                <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="Verdana" 
                                    Font-Size="Smaller" ForeColor="#284775" Text="Cadastro de Cargos"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
            </td>
            </tr>
      </table>
        
    </asp:Content>